home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / INASM101.ARJ / INASM101.DOC < prev    next >
Text File  |  1992-04-03  |  5KB  |  210 lines

  1. DOCUMENTATION FOR INASM VERSION 1.0
  2. -----------------------------------
  3.  
  4.  
  5. Thank you  for trying  my product.  This Assembler  produces Turbo
  6. Pascal and  Modula-2 Inline  Sourcefiles. In  Turbo Pascal 6.0 you
  7. don't have  to use it, because Turbo Pascal 6.0 has its own Inline
  8. Assembler.
  9.  
  10. The Syntax is:
  11.  
  12. [Label:] OPCODE|[Directive][,Arg1[Arg2]] [; Comments]
  13.  
  14.  
  15. The Inline  - Assembler is totally compatible to MASM. But because
  16. of the  relocatible code  produced by  the Assembler  there are no
  17. Statements for  segmentation, procedures  and functions. Therefore
  18. Macros,  Constants,   External  Variables,   and   all   necessary
  19. Assemblerfunctions   are supported.  This assembler should only be
  20. used to assemble small parts of code, which can speed up a program
  21. very  significantly.   For  example   if  you  are  programming  a
  22. texteditor you  write  whole  the  program  in  pascal  or  modula
  23. sourcecode, but  to speed  up screen  output,  you  can  write  an
  24. inlineprocedure, that uses DMA to move data to screen.
  25.  
  26. EXT
  27. ---
  28.  
  29. Syntax:   LABEL        EXT
  30.  
  31. Meaning:  This   label  is  a  external  variable,  and  shall  be
  32. referenced
  33. by your compiler.
  34.  
  35. EQU
  36. ---
  37.  
  38. Syntax:   NAME         EQU   Constant (may be String or value)
  39.  
  40. Meaning:  Name   shall  be  replaced  whole  the  sourcecode  with
  41. Constant.
  42. Use this  feature, to  make your  programs easier  to read.  ("Int
  43. Dosfunction" is better to read than "Int 21H", isn't it?).
  44.  
  45. SET
  46. ---
  47.  
  48. Syntax:  NAME         SET  Calcable constant
  49.  
  50. Meaning: You  can use  MASM-Compatible Operators,  to calculate  a
  51. value.
  52.  
  53. DB
  54. --
  55.  
  56. Syntax:  NAME     DB Value, Value,....
  57.  
  58. Meaning: With this you are able to enter lists of bytes, which you
  59. could process further.
  60. DW
  61. --
  62.  
  63. Syntax: NAME    DW Value
  64.  
  65. Meaning: The same as DB, but only a Word-Variable is allowed.
  66.  
  67.  
  68. MACRO-Definition
  69. ----------------
  70.  
  71. With INASM  you can  write Assembler-Macros.  It can  have as much
  72. arguments as  you like.  But you  should obtain  some  rules  when
  73. programming.
  74.  
  75. 1) Preceed each Argumentname with an Commercial A ("@").
  76. 2) Don't give names, which are equally to the Assembler Codeset.
  77. 3) Local  labels you should mark especially, because then the text
  78. is much easier to read.
  79.  
  80. A Macro can call another Macro, but may not call itself.
  81.  
  82. Syntax:
  83.  
  84. NAME    MACRO ARG1,ARG2,ARG3,.......
  85.          .
  86.         .
  87.         .
  88.         ENDM
  89.  
  90. You can test Arguments for their contents. There are IF-ELSE-ENDIF
  91. Constructs, which can test arguments for their Value.
  92.  
  93. example:
  94.  
  95. TEST  MACRO @A,@B
  96.       IF @A = AX
  97.         ----> Special treatment for this case
  98.       ELSE
  99.         ----> Another treatment
  100.       ENDIF --> End of Statement
  101.  
  102.  
  103. BUILT IN INTERPRETER
  104. --------------------
  105.  
  106. The built  in Interpreter can parse mathematical instructions that
  107. consists of  EQU-Constants, Values  and MASM-compatible operators.
  108. For example you can calculate "(12 * 15 + (12 SHL 5)) OR VALUE1".
  109. Operators are:
  110. NOT, AND, OR, XOR, SHL, SHR, DIV, MOD, +, -, *, /, and brackets up
  111. to 15  levels. Values  can be entered in decimal, hexadecimal, and
  112. binary digits:
  113.  1234   ---> decimal
  114.  1234H  ---> hex
  115.  1010B  ---> binary
  116.  
  117.  
  118. ERRORS
  119. ------
  120.  
  121. INASM produces  several errors,  when there  is something  in  the
  122. Sourcecode INASM doesn't understand.
  123.  
  124. Error:
  125.  
  126. 1. Illegal Digits
  127.  
  128.     Maybe you forgot the base directives in a value.
  129.  
  130. 2. Error in strings
  131.  
  132.     You entered characters, that are not allowed in a string.
  133.  
  134. 3. Wrong characters
  135.  
  136.     This error occurs, when an argument of a macro is not OK.
  137.  
  138. 4. Label not defined
  139.  
  140.     You referenced a label, you did not define - check your source
  141.     code.
  142.  
  143. 5. Illegal String
  144.  
  145.     You entered a string, that is not allowed. Strings are only
  146.     allowed when using the DB - directive.
  147.  
  148. 6. Division by zero
  149.  
  150.     Produced by the built in Interpreter while calculating an
  151.     expression.
  152.  
  153. 7. Label double defined
  154.  
  155.     Check your sourcecode for the first apearance of the dis-
  156.     played label.
  157.  
  158. 8. Rangecheck error
  159.  
  160.     This error occurs only while the Interpreter calculates an
  161.     expression (Integer, Cardinal, Word, Byte, Shortint variables)
  162.  
  163. 9. Conversion error
  164.  
  165.     If this error occurs there's a bug in INASM and you should
  166.     report this error to me, so that I can help you solving
  167.     your problem.
  168.  
  169. 10. Variable double defined
  170.  
  171.     There's a Variable defined double. Maybe you did not think of
  172.     the restriction of variables to 15 Characters.
  173.  
  174.  
  175.  
  176. 11. Phase Error
  177.     This error occurs only when referencing forward defined labels
  178.  
  179. 12. Macro error
  180.  
  181.     There's an error in the definition of the macro. Check Syntax.
  182.  
  183. 13. Bracket error
  184.  
  185.     Interpreter error: The number of opened and closed Brackets
  186.     does not correspond.
  187.  
  188. 14. Opcode Error
  189.  
  190.     Wrong opcode. Maybe you started the Assemblerline in the first
  191.     column. This is forbidden. Opcodes must start at least in
  192.     Column 2.
  193.  
  194. 15. Different Macros
  195.  
  196.     You cannot define a macro inside of another macro. There's no
  197.     need doing so. Just extract this macro to another primary
  198.     macro.
  199.  
  200. 16. ELSE without IF
  201.  
  202. 17. ENDIF without IF
  203.  
  204. 18. IF without ENDIF
  205.  
  206. 19. MACRO without ENDM
  207.  
  208.     See the description of MACRO-Syntax above.
  209.  
  210.